<template>
  <div class="navbar">
    <router-link to="/orderMenu" class="nav-item">点餐<i class="line"></i></router-link>
    <router-link to="/comment" class="nav-item">评价<i class="line"></i></router-link>
    <router-link to="/merchant" class="nav-item">商家<i class="line"></i></router-link>
  </div>
</template>

<script>
export default {
  name: 'NavBar'
}
</script>

<style scoped lang="less">
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  background-color: #fff;
  justify-content: space-around;
  border-bottom: 1px solid #ccc;
  .nav-item {
    padding: 10px 20px;
    &.active {
      position: relative;
      color: #333;
      font-weight: 700;
      font-size: 16px;
      .line {
        position: absolute;
        bottom: 0;
        left: 18px;
        width: 30px;
        border: 2px solid cyan;
      }
    }
  }
}
</style>
